/*
 * MainStab.cpp
 *
 *  Created on: Jan 26, 2014
 *      Author: ik
 */

#include <iostream>
#include <CplexStabSolver.h>
#include <Grafo.h>
#include <RDCliquer.h>
#include <OsterCliquer.h>
#include <BitParallelCliquer.h>
#include <CliquerGoloso.h>
#include <TimeLimit.h>

using namespace std;

int main(int argc, char *argv[]) {
//	string archivo = "/home/ik/workspace/clique-projection/instances/brock200_2.clq";
//	string archivo = "/home/correa/workspace/pargo-instances/clique/dimacs/C125.9.clq";

	if ( argc < 2 )
	{
		cout << "Llamada: stab <archivo grafo>\n";
		exit(0);
	}

	cout << argv[1] << endl;
	Grafo g(argv[1]);
	g.turnToComp();
	g.haceIncambiable();

	int K;
	if (argc >= 3)
		K = atoi(argv[2]);
	else
		K = 0;

	CplexStabSolver ss(g);
	SeparatorParameters	parameters(RD, Goloso, RD, Clique, 3, K, 50, 0.05, 50);
// C125.9   dens. 0.10
//	SeparatorParameters * parameters = new SeparatorParameters(RD, Goloso, RD, 0.0, 10, 0.15, 5, 15, 0.15, 500, 12, 80);

	DoubleValueArray& mip = *ss.solve(parameters);
	parameters.print();
//	for (int i = 0; i< g.getN(); i++)
//		cout << mip[i];
//	cout << "\n";
	delete &mip;
//
//	delete ss;
//	delete rd;
//	delete bp;
//	delete subgrafo;
//	delete clique;
//	delete grado;
//	delete g;

	return 0;
}
